/**
 * Created by lwei on 2017/4/11.
 */
var apiRepair = "../../index/";
var apiNewRepair = "../../new_index/";
var apiRecycle = "../../index_recycle/";
var recycleStatus = {
	"-1":"后台未处理",
	"0":"后台未处理",
	"1":"待接单",
	"2":"待回收",
	"3":"师傅确认",
	"4":"客户取消",
	"5":"答应回收",
	"6":"已完成",
	"7":"已评价"
};
function getQueryString(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
	var r = window.location.search.substr(1).match(reg);
	if (r != null) return unescape(r[2]); return '';
}

$.ajaxSetup({
	complete:function(d){
		if(d.responseJSON){
			if(d.responseJSON.code==0){
				alert("未登录");
				location.href = "admin_login.html";
			}
		} else {
			alert("接口调用出错");
			console.log("接口调用出错", d);
		}
	}
});